package org.blogwu.learn.multithread.chapter2.demo3;

public class Test3 {

    static Object obj1 = new Object();

    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(() -> {

            synchronized (obj1) {
                try {
                    obj1.wait();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }

        });

        t1.start();
        Thread.sleep(2000);
        t1.interrupt();
    }
}
